{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Hello, World!\n"
     ]
    }
   ],
   "source": [
    "print(\"Hello, World!\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[30]]\n",
      "[[ 0  0  0  0  0]\n",
      " [ 0  1  2  3  4]\n",
      " [ 0  2  4  6  8]\n",
      " [ 0  3  6  9 12]\n",
      " [ 0  4  8 12 16]]\n"
     ]
    }
   ],
   "source": [
    "import numpy as np\n",
    "x = np.arange(5).reshape(1,5)\n",
    "y = np.arange(5).reshape(5,1)\n",
    "print(np.dot(x,y))\n",
    "print(np.dot(x.T, y.T))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "This time I come with the awesome `TensorFlow`!"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "tf.Tensor([1 2 4], shape=(3,), dtype=int32)\n"
     ]
    }
   ],
   "source": [
    "import tensorflow as tf\n",
    "x = tf.constant([1, 2, 3])\n",
    "y = tf.constant([0, 0, 1])\n",
    "print(x + y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "tf.Tensor([ 3  6 12], shape=(3,), dtype=int32)\n",
      "tf.Tensor([ 0  0 27], shape=(3,), dtype=int32)\n"
     ]
    }
   ],
   "source": [
    "@tf.function\n",
    "def compute(a, b, c):\n",
    "    '''\n",
    "    Don't panic, this function is absolutely meaningless, dispite its illustration of the use of tensors.\n",
    "    '''\n",
    "    d = a * b + c\n",
    "    e = a * b * c\n",
    "    return d, e\n",
    "\n",
    "z = tf.constant([3, 6, 9])\n",
    "for tensor in compute(x, y, z):\n",
    "    print(tensor)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**Let's be <span style=\"background-color:olive; color:yellow\">AWESOME</span>**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
